package com.lovo.project.controller;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.lovo.project.bean.BuyInGoodsBean;
import com.lovo.project.service.BuyInGoodsService;
import com.lovo.project.service.BuyInService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
@RequestMapping("/buyingoods")
public class BuyInGoodsController {
    @Autowired
    BuyInGoodsService buyInGoodsService;

    @RequestMapping("/queryBuyInGoodsList")
    public List<BuyInGoodsBean> queryBuyInGoodsList(Integer buyInId){
        QueryWrapper queryWrapper=new QueryWrapper();
        queryWrapper.eq("buyin_id",buyInId);
         List<BuyInGoodsBean> list=buyInGoodsService.queryBuyInGoodsList(queryWrapper);
         return list;
    }
}
